﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PyroGen;

namespace PyroGenTest
{
    [TestClass]
    public class CodeTextBoxTest
    {
        [TestMethod]
        public void TextHistoryCreation()
        {
            TextHistory th = new TextHistory();
            th.Add("foo", 1, 2);
            th.Add("bar", 3, 4);
           
         //   TODO: clean this up
            Assert.AreEqual<TextHistory.HistoryItem>(th.Undo(), new TextHistory.HistoryItem("bar", 3, 4));
            Assert.AreEqual<TextHistory.HistoryItem>(th.Undo(), new TextHistory.HistoryItem("foo", 1, 2));
            //Assert.AreEqual<TextHistory.HistoryItem>(th.Undo(), new TextHistory.HistoryItem("bar", 3, 4));
            //Assert.AreEqual<TextHistory.HistoryItem>(th.Undo(), new TextHistory.HistoryItem("bar", 3, 4));
            //Assert.AreEqual<TextHistory.HistoryItem>(th.Redo(), new TextHistory.HistoryItem("foo", 1, 2));
        //    Assert.AreEqual<TextHistory.HistoryItem>(th.Redo(), new TextHistory.HistoryItem("bar", 3, 4));
           // Assert.AreEqual<TextHistory.HistoryItem>(th.Redo(), new TextHistory.HistoryItem("foo", 1, 2));
        }
    }
}
